<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/inc/taglib.inc"%>
<%@ include file="/WEB-INF/inc/script.inc"%>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="${base}">
<title>中金通 | 部门列表</title>

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="js/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet">
<!-- FooTable -->
<link href="css/plugins/footable/footable.core.css" rel="stylesheet">
<!-- Data Tables -->
<link href="css/plugins/dataTables/dataTables.bootstrap.css"
	rel="stylesheet">
<link href="css/plugins/dataTables/dataTables.responsive.css"
	rel="stylesheet">
<link href="css/plugins/dataTables/dataTables.tableTools.min.css"
	rel="stylesheet">

<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/plugins/jsTree/style.min.css" rel="stylesheet">

<link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet">
<style type="text/css">
.detailText {
	padding: 6px 12px;
}

.ui-autocomplete {
	z-index: 22222;
}
</style>
</head>
<body>
	<div id="wrapper">
		<!-- 左侧菜单 -->
		<jsp:include page="/WEB-INF/jsp/common/main-menu.jsp"></jsp:include>

		<div id="page-wrapper" class="gray-bg">
			<div class="row border-bottom">
				<!-- 头部工具栏区 -->
				<jsp:include page="/WEB-INF/jsp/common/main-header.jsp"></jsp:include>
			</div>
			<div class="row wrapper border-bottom white-bg page-heading">
				<div class="col-lg-10">
					<h2>系统管理</h2>
					<ol class="breadcrumb">
						<li><a href="index.html">Home</a></li>
						<li><a>系统管理</a></li>
						<li class="active"><strong>部门员工管理</strong></li>
					</ol>
				</div>
				<div class="col-lg-2"></div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<div class="wrapper wrapper-content">
						<div class="row">
							<div class="col-lg-2">
								<div class="ibox float-e-margins">
									<div class="ibox-content mailbox-content">
										<div class="file-manager">
											<div class="space-25"></div>
											<h5>部门架构</h5>
											<div id="resourceTree" class="tree-demo"></div>
											<div class="clearfix"></div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-lg-10">
								<div class="ibox float-e-margins">
									<div class="ibox-title">
										<h5>当前部门：</h5>
										<h5 id="groupName"></h5>
										<input type="hidden" id="groupId" name="groupId" />

										<div class="row">
											<div class="col-sm-1"></div>
											<div class="col-sm-5">
												<h5 id="chargeman"></h5>
												<h5 id="chargemanId" style="display:none;"></h5>
											</div>
										</div>
										<!-- <div class="ibox-tools">
											<a class="collapse-link"> <i class="fa fa-chevron-up"></i></a>
											<a class="close-link"> <i class="fa fa-times"></i>
											</a>
										</div> -->
									</div>
									<div class="ibox-content">
										<div class="row">
											<div class="col-sm-9 m-b-xs">
												<div data-toggle="buttons" class="btn-group">
													<button class="btn btn-primary" id="addEmpBtn"
														type="button">添加员工</button>
												</div>
												<div data-toggle="buttons" class="btn-group">
													<button class="btn btn-primary" id="addBtn" type="button">新增部门</button>
													<button class="btn btn-primary" id="delBtn" type="button">删除部门</button>
													<button class="btn btn-primary" id="editBtn" type="button">修改部门</button>
												</div>
											</div>
											<!-- <div class="col-sm-3">
												<div class="input-group">
													<input type="text" placeholder="输入员工姓名"
														class="input-sm form-control"> <span
														class="input-group-btn">
														<button type="button" class="btn btn-sm btn-primary">搜索</button>
													</span>
												</div>
											</div> -->
										</div>
										<div class="table table-striped">
											<table id="modelEditable" class="table table-striped">
												<thead>
													<tr>
														<th>姓名</th>
														<th>工号</th>
														<th>手机号</th>
														<th>登录账号</th>
														<th>设备</th>
														<th>状态</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody>

												</tbody>
											</table>
										</div>

									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

			<!-- editEmpGroupModelBody begin-->
			<div id="editEmpGroupModelBody"></div>
			<script id="editEmpGroupModelTemplate" type="text/x-jquery-tmpl">
			<div class="modal inmodal fade" id="editEmpGroupModel" tabindex="-1" role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-lg">
					<div class="modal-content animated fadeIn">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<h4 class="modal-title">修改部门</h4>
						</div>
						<div class="modal-body">
							<form method="post" id="editEmpGroupModelForm" class="form-horizontal">
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>部门名称</label>
									<div class="col-sm-8">
										<input type="text" name="groupNameUpdata" id="groupNameUpdata" value="{{= groupName}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">是否为理财师团队</label>
									<div class="col-sm-2">
										<input type="checkbox" name="plannerGroupUpdata" id="plannerGroupUpdata" value="1"
											class="form-control" {{if plannerGroup == 1}}checked{{/if}}>
									</div>
									<div class="col-sm-5">
										<span class="help-block m-b-none">理财师团队指一线销售团队，团队内的成员直接面向客户，在数据统计时会显示团队销售数据。理财师团队下不能再新增子部门。</span>
									</div>								
								</div>
								<div class="modal-footer">
									<button type="button" class="btn btn-white" data-dismiss="modal">取 消</button>
									<button type="submit" id="editEmpGroupBtn" class="btn btn-primary">保 存</button>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			</script>
			<!-- editEmpGroupModelBody end-->
			
			<!-- addEmpGroupModelBody begin-->
			<div id="addEmpGroupModelBody"></div>
			<script id="addEmpGroupModelTemplate" type="text/x-jquery-tmpl">
			<div class="modal inmodal fade" id="addEmpGroupModel" tabindex="-1" role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-lg">
					<div class="modal-content animated fadeIn">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<h4 class="modal-title">新增部门</h4>
						</div>
						<div class="modal-body">
							<form method="post" id="addEmpGroupModelForm" class="form-horizontal">
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>部门名称</label>
									<div class="col-sm-8">
										<input type="text" name="groupNameAdd" id="groupNameAdd" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">是否为理财师团队</label>
									<div class="col-sm-2">
										<input type="checkbox" name="plannerGroupAdd" id="plannerGroupAdd" value="1"
											class="form-control">
									</div>
									<div class="col-sm-5">
										<span class="help-block m-b-none">理财师团队指一线销售团队，团队内的成员直接面向客户，在数据统计时会显示团队销售数据。理财师团队下不能再新增子部门。</span>
									</div>								
								</div>
								<div class="modal-footer">
									<button type="button" class="btn btn-white" data-dismiss="modal">取 消</button>
									<button type="submit" id="addEmpGroupBtn" class="btn btn-primary">保 存</button>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			</script>
			<!-- addEmpGroupModelBody end-->
			
			<!-- addEmpModelBody begin-->
			<div id="addEmpModelBody"></div>
			<script id="addEmpModelTemplate" type="text/x-jquery-tmpl">
			<div class="modal fade bs-modal-lg in" id="addEmpModel" tabindex="-1" role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-lg">
					<div class="modal-content animated fadeIn">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<h4 class="modal-title">新增员工</h4>
						</div>
						<div class="modal-body">
							<form method="post" id="addEmpModelForm" class="form-horizontal">
								<div class="form-group">
	                                <label class="col-sm-2 control-label">用户头像</label>
		                            <div class="col-sm-8">
										<input type="file" name="file" id="file" class="form-control">
									</div>
		                        </div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>员工姓名</label>
									<div class="col-sm-8">
										<input type="text" name="name" id="name" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>工号</label>
									<div class="col-sm-8">
										<input type="text" name="employeeNo" id="employeeNo" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>手机</label>
									<div class="col-sm-8">
										<input type="text" name="mobile" id="mobile" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>登录账号</label>
									<div class="col-sm-8">
										<input type="text" name="account" id="account" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">邮箱</label>
									<div class="col-sm-8">
										<input type="text" name="email" id="email" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">职位</label>
									<div class="col-sm-8">
										<input type="text" name="position" id="position" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">生日</label>
									<div class="col-sm-8">
										<input type="date" name="birthday" id="birthday" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">入职时间</label>
									<div class="col-sm-8">
										<input type="date" name="entryTime" id="entryTime" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">身份证</label>
									<div class="col-sm-8">
										<input type="text" name="idcard" id="idcard" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">住址</label>
									<div class="col-sm-8">
										<input type="text" name="address" id="address" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">性别</label>
									<div class="col-sm-8">
										<select class="form-control m-b" id="gender" name="gender">
											<option value="1">男</option>
											<option value="2">女</option>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">状态</label>
									<div class="col-sm-8">
										<select class="form-control m-b" id="state">
											<option value="0">在职</option>
											<option value="1">离职</option>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>登录密码</label>
									<div class="col-sm-8">
										<input type="password" name="loginPwd" id="loginPwd" value=""
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>工作密码</label>
									<div class="col-sm-8">
										<input type="password" name="workPwd" id="workPwd" value=""
											class="form-control">
									</div>
								</div>
								<div class="modal-footer">
									<button type="button" class="btn btn-white" data-dismiss="modal">取 消</button>
									<button type="submit" id="addEmpBtn" class="btn btn-primary">保 存</button>
								</div>
							</form>
						</div>
						
					</div>
				</div>
			</div>
			</script>
			<!-- addEmpModelBody end-->
			
			<!-- employee detailModel begin -->
			<div id="detailBody"></div>
			<script id="detailTemplate" type="text/x-jquery-tmpl">
			<div class="modal fade bs-modal-lg in" id="detailModel" tabindex="-1"
				role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-lg">
					<div class="modal-content">
						<form method="post" id="detailModelForm" class="form-horizontal">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal">
									<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
								</button>
								<h4 class="modal-title">员工详情</h4>
							</div>
							<div class="modal-body">
								<input type="hidden" id="employeeId" name="employeeId"
									value="{{= employeeId}}">
								<div class="row">
									<div class="col-md-1">
									</div>
									<div class="col-md-6">
									<div class="m-b-xs">
										<div data-toggle="buttons" class="btn-group" id="detailGroupButton">
											<button class="btn btn-primary" id="edit" type="button">编辑</button>
											<button class="btn btn-primary" id="password" type="button">重置密码</button>
											<button class="btn btn-primary" id="device" type="button">分配设备</button>
										</div>
									</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">头像</label>
											<div class="col-sm-8">
												<img
													src="{{if avatar}}${imagePrefix}{{= avatar}}{{else}}avatar/employee.jpg{{/if}}"
													width="50px" height="50px" alt="头像">
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">员工姓名</label>
											<div class="col-sm-8">
												<input type="text" value="{{= name}}" name="name"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">性别</label>
											<div class="col-sm-8">
												<input type="text"
													value="{{if gender == 1}}男{{/if}}{{if gender == 2}}女{{/if}}"
													name="gender" style="background: #f8fafb; border: 0px;"
													readonly class="form-control">
											</div>
										</div>
									</div>
								</div>

								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">账号</label>
											<div class="col-sm-8">
												<input type="text" name="account" value="{{= account}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">工号</label>
											<div class="col-sm-8">
												<input type="text" name="employeeNo"
													value="{{= employeeNo}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
								</div>

								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">手机</label>
											<div class="col-sm-8">
												<input type="text" name="mobile" value="{{= mobile}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">邮箱</label>
											<div class="col-sm-8">
												<input type="text" name="email"
													value="{{if email}}{{= email}}{{else}}--{{/if}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
								</div>

								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">部门</label>
											<div class="col-sm-8">
												<input type="text" name="department"
													value="{{if department}}{{= department}}{{else}}--{{/if}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">职位</label>
											<div class="col-sm-8">
												<input type="text" name="position"
													value="{{if position}}{{= position}}{{else}}--{{/if}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">领取的Pad编号</label>
											<div class="col-sm-8">
												<input type="text" name="padSerialNumber"
													value="{{if padSerialNumber}}{{= padSerialNumber}}{{else}}--{{/if}}"
													class="form-control"
													style="background: #f8fafb; border: 0px;" readonly>
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">领取的Pos编号</label>
											<div class="col-sm-8">
												<input type="text" name="posSerialNumber"
													value="{{if posSerialNumber}}{{= posSerialNumber}}{{else}}--{{/if}}"
													class="form-control"
													style="background: #f8fafb; border: 0px;" readonly>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">生日</label>
											<div class="col-sm-8">
												<input type="text" id="birthday"
													value="{{if birthdayStr}}{{= birthdayStr}}{{else}}--{{/if}}"
													name="birthday" style="background: #f8fafb; border: 0px;"
													readonly class="form-control">
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">入职时间</label>
											<div class="col-sm-8">
												<input type="text" id="entryTime"
													value="{{if entryTimeStr}}{{= entryTimeStr}}{{else}}--{{/if}}"
													name="entryTime" style="background: #f8fafb; border: 0px;"
													readonly class="form-control">
											</div>
										</div>
									</div>
								</div>

								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">身份证</label>
											<div class="col-sm-8">
												<input type="text" name="idcard"
													value="{{if idcard}}{{= idcard}}{{else}}--{{/if}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<label class="col-sm-4 control-label">状态</label>
											<div class="col-sm-8">
												<input type="text"
													value="{{if state == 1}}在职{{/if}}{{if state == 0}}离职{{/if}}"
													name="state" style="background: #f8fafb; border: 0px;"
													readonly class="form-control">
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12">
										<div class="form-group">
											<label class="col-sm-2 control-label">地址</label>
											<div class="col-sm-10">
												<input type="text" name="address"
													value="{{if address}}{{= address}}{{else}}--{{/if}}"
													style="background: #f8fafb; border: 0px;" readonly
													class="form-control">
											</div>
										</div>
									</div>
								</div>



							</div>
							<div class="modal-footer">
								<div class="col-sm-4 col-sm-offset-3">
									<button type="button" class="btn btn-white"
										data-dismiss="modal">确 定</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			</script>
			<!-- employee detailModel end -->
			
			<!-- update roleModel start -->
			<div class="modal inmodal fade" id="setRoleModel" tabindex="-1"
				role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-lg">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<h4 class="modal-title">设置用户角色</h4>
						</div>
						<div class="modal-body">
							<div id="setRoleBody"></div>
							<script id="setRoleTemplate" type="text/x-jquery-tmpl">
                               <form method="post" id="setRoleModelForm" class="form-horizontal">
								<input type="hidden" value="0" id="rootLoad"/>
								<input type="hidden" value="{{= employeeId}}" id="employeeId" name="employeeId"/>
                                <div class="form-group"><label class="col-sm-2 control-label">员工姓名</label>
                                    <div class="col-sm-8"><input type="text" style="background:#f8fafb;border:0px;" readonly name="name" value="{{= name}}" class="form-control"></div>
                                </div>
                                
                                <div class="form-group"><label class="col-sm-2 control-label">工号</label>
                                    <div class="col-sm-8"><input type="text" style="background:#f8fafb;border:0px;" readonly name="employeeNo" value="{{= employeeNo}}" placeholder="工号" class="form-control">
                                    </div>
                                </div>
                                
                                <div class="form-group"><label class="col-sm-2 control-label">用户角色</label>
                                    <div class="col-sm-8">
									<div id="roleTree" class="tree-demo">
									</div>
									<input type="hidden" id="roleIds" name="roleIds"/>
									<input type="hidden" id="old_roleIds"/>
									<input type="hidden" id="roleNames"/>
                                </div>
                                
                            </form>
										</script>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-white" data-dismiss="modal">取
								消</button>
							<button type="button" id="setRoleModelBtn"
								class="btn btn-primary">保 存</button>
						</div>
					</div>
				</div>
			</div>
			<!-- update roleModel end -->
			
			<!-- input role verification code start -->
			<button type="button" class="btn btn-primary" style="display:none;" id="input_verification" data-toggle="modal" data-target="#verificationModal"></button>
			<div class="modal inmodal" id="verificationModal" tabindex="-1" role="dialog" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content animated fadeIn">
                        <div class="modal-header">
                            <h4 class="modal-title">请依次输入对应角色验证码</h4>
                    	</div>
	                    <div class="modal-body">
	                    	<form method="post" class="form-horizontal"    id="inputVerificationSpan" >
	                    	</form>
		                    <div class="modal-footer">
		                        <button type="button" class="btn btn-white" id="dsimiss_input_verification" data-dismiss="modal">取消</button>
		                        <button type="button" id="btn_modify_roles_verification" class="btn btn-primary">确认</button>
		                    </div>
	                	</div>
            		</div>
        		</div>
        </div>
        <!-- input role verification code end -->
        
			<!-- update passwordModel start -->
			<div class="modal inmodal fade" id="updatePasswd" tabindex="-1"
				role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-md">
					<div class="modal-content  ibox-content">
						<form method="post" id="updatePasswdForm" class="form-horizontal">

							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal">
									<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
								</button>
								<h4 class="modal-title">重置密码</h4>
							</div>
							<div class="modal-body">
								<div id="updatePasswdBody"></div>
								<script id="updatePasswdTemplate" type="text/x-jquery-tmpl">
                               <input type="hidden" id="employeeId" name="employeeId" value="{{= employeeId}}">
									<div class="form-group">
										<label class="col-sm-3 control-label"><font color="red">* </font>密码类型</label>
                                    	<div class="col-sm-8">
                                        	<div class="i-checks"><label> <input type="radio" id="loginPwd" value="3" name="state"> <i></i> 登录密码 </label></div>
                                        	<div class="i-checks"><label> <input type="radio" id="workPwd" value="2" checked name="state"> <i></i> 工作密码 </label></div>
                                    	</div>
                                	</div>										
									<div class="form-group" id="newpasswdDiv">
		                                <label class="col-sm-3 control-label"><font color="red">* </font>新密码</label>
		                                    <div class="col-sm-8"><input type="password" id="newpasswd" name="loginPwd" placeholder="新密码" class="form-control"></div>
		                            </div>
									<div class="form-group" id="repasswdDiv">
		                                <label class="col-sm-3 control-label"><font color="red">* </font>重复新密码</label>
		                                    <div class="col-sm-8"><input type="password" id="repasswd" name="workPwd" placeholder="再次输入新密码" class="form-control"></div>
		                            </div>
                                
										</script>
							</div>
							<div class="modal-footer">
								<div class="col-sm-4 col-sm-offset-3">
									<button type="button" class="btn btn-white"
										data-dismiss="modal">取 消</button>
									<button type="submit" id="savePasswd" class="btn btn-primary">确
										定</button>
								</div>
							</div>
						</form>
					</div>

				</div>
			</div>
			<!-- update passwordModel end -->
			
			<!-- editEmpModelBody begin-->
			<div id="editEmpModelBody"></div>
			<script id="editEmpModelTemplate" type="text/x-jquery-tmpl">
			<div class="modal fade bs-modal-lg in" id="editEmpModel" tabindex="-1" role="dialog" aria-hidden="true" style="overflow:auto;">
				<div class="modal-dialog modal-lg">
					<div class="modal-content animated fadeIn">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<h4 class="modal-title">编辑员工</h4>
						</div>
						<div class="modal-body">
							<form method="post" id="editEmpModelForm" class="form-horizontal">
								<div class="form-group">
	                                <label class="col-sm-2 control-label">用户头像</label>
		                            <div class="col-sm-8">
										<input type="file" name="file" id="file" class="form-control" accept=".jpg,.jpeg,.png,.bmp">
									</div>
		                        </div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>员工姓名</label>
									<div class="col-sm-8">
										<input type="text" name="name" id="name" value="{{= name}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>工号</label>
									<div class="col-sm-8">
										<input type="text" name="employeeNo" id="employeeNo" value="{{= employeeNo}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>手机</label>
									<div class="col-sm-8">
										<input type="text" name="mobile" id="mobile" value="{{= mobile}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>登录账号</label>
									<div class="col-sm-8">
										<input type="text" name="account" id="account" value="{{= account}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">邮箱</label>
									<div class="col-sm-8">
										<input type="text" name="email" id="email" value="{{if email}}{{= email}}{{/if}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">职位</label>
									<div class="col-sm-8">
										<input type="text" name="position" id="position" value="{{if position}}{{= position}}{{/if}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">生日</label>
									<div class="col-sm-8">
										<input type="date" name="birthday" id="birthday" value="{{if birthday}}{{= birthday}}{{/if}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">入职时间</label>
									<div class="col-sm-8">
										<input type="date" name="entryTime" id="entryTime" value="{{if entryTime}}{{= entryTime}}{{/if}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">身份证</label>
									<div class="col-sm-8">
										<input type="text" name="idcard" id="idcard" value="{{if idcard}}{{= idcard }}{{/if}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">住址</label>
									<div class="col-sm-8">
										<input type="text" name="address" id="address" value="{{if address}}{{= address}}{{/if}}"
											class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">性别</label>
									<div class="col-sm-8">
										<select class="form-control m-b" id="gender" name="gender">
											<option value="1" {{if gender==1}}selected{{/if}}>男</option>
											<option value="2" {{if gender==2}}selected{{/if}}>女</option>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label"><font color="red">*
									</font>部门</label>
									<div class="col-sm-8">
										<input type="hidden" id="deptId" name="deptId" value="{{= deptId}}" >
										<input type="text" name="department" id="department" value="{{= department}}" class="form-control" style="background: #ffffff;" readonly>
										<div id="deptTree" class="tree-demo"></div>
									</div>
								</div>
								<div class="modal-footer">
									<button type="button" class="btn btn-white" data-dismiss="modal">取 消</button>
									<button type="submit" id="editEmpBtn" class="btn btn-primary">保 存</button>
								</div>
							</form>
						</div>
						
					</div>
				</div>
			</div>
			</script>
			<!-- addEmpModelBody end-->
			
			<!-- delivery device start -->
			<div class="modal inmodal fade" id="bindDevice" tabindex="-1"
				role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-md">
					<div class="modal-content  ibox-content">
						<form method="post" id="bindDeviceForm" class="form-horizontal">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal">
									<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
								</button>
								<h4 class="modal-title">分配设备</h4>
							</div>
							<div class="modal-body">
								<div class="form-group">
									<label class="col-sm-3 control-label"><font color="red">*
									</font>Pad编号</label>
									<div class="col-sm-8">
										<!-- <input type="text" id="padId" name="padId" placeholder="输入Pad编号查询" class="form-control"> -->
										<input type="text" id="padId" name="padId" placeholder="输入Pad编号查询" class="ui-autocomplete-input form-control" autocomplete="off">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label"><font color="red">*
									</font>对应Pos编号</label>
									<div class="col-sm-8">
										<input type="text" id="posId" style="background: #f8fafb; border: 0px;" readonly name="posId" class="form-control">
										<input type="hidden" id="posPadId" name="posPadId">
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<div class="col-sm-8">
									<button type="button" class="btn btn-white" data-dismiss="modal">取 消</button>
									<button type="button" id="saveBindDevice" class="btn btn-primary">分 配</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- delivery device end -->
			
			
			<!--look roles start -->
			<div class="modal inmodal fade" id="lookRolesModel" tabindex="-1" role="dialog"  aria-hidden="true">
                                <div class="modal-dialog modal-lg">
                                    <div class="modal-content animated fadeIn">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                            <h4 class="modal-title">查看角色权限</h4>
                                        </div>
                                        <div class="modal-body">
                                        <div id="updateBody"></div>
										<script id="updateTemplate" type="text/x-jquery-tmpl">
                               <form method="post" id="updateModelForm" class="form-horizontal">
								<input type="hidden" value="0" id="rootLoad"/>
								<input type="hidden" value="{{= roleId}}" id="roleId" name="roleId"/>
                                <div class="form-group"><label class="col-sm-2 control-label">角色名</label>
                                    <div class="col-sm-8" style="margin-top:8px;">{{= roleName}}</div>
                                </div>
                                <div class="form-group"><label class="col-sm-2 control-label">角色权限</label>
                                    <div class="col-sm-8">
                                    <div id="authTree" class="tree-demo">
									</div>
									<input type="hidden" id="authIds" name="authIds"/>
                                    </div>
                                </div>
                            </form>
						</script>
                         </div>
                         <div class="modal-footer">
                             <button type="button" class="btn btn-white" data-dismiss="modal">确 定</button>
                         </div>
                     </div>
                 </div>
             </div>
            <!--look roles end -->
            
                        
			<!-- 底部版权 -->
			<jsp:include page="/WEB-INF/jsp/common/main-footer.jsp"></jsp:include>
		</div>
	</div>

	<script src="js/jquery-2.1.1.js"></script>
	<script src="js/plugins/validate/jquery.validate.min.js"></script>
	<script src="js/plugins/validate/jquery.validate.messages-zh_CN.js"></script>
	<!-- <script src="js/plugins/jeditable/jquery.jeditable.js"></script> -->
	<script src="js/jquery.serialize-object.min.js" type="text/javascript"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>

	<!-- Custom and plugin javascript -->
	<script src="js/inspinia.js"></script>
	<script src="js/plugins/pace/pace.min.js"></script>
	<script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
	<script src="js/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
	<script src="js/jquery.tmpl.min.js" type="text/javascript"></script>

	<!-- Data picker -->
	<script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>

	<!-- Data Tables -->
	<script src="js/plugins/dataTables/jquery.dataTables.min.js"></script>
	<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
	<script src="js/plugins/dataTables/dataTables.responsive.js"></script>
	<script src="js/plugins/dataTables/dataTables.tableTools.min.js"></script>
	<!-- iCheck -->
	<script src="js/plugins/iCheck/icheck.min.js"></script>
	<!-- 业务 -->
	<script src="js/ajaxfileupload.js"></script>
	<script src="js/plugins/jsTree/jstree.min.js"></script>
	<script src="js/groupEmployee/groupEmployee-module.js"></script>
	<script src="js/groupEmployee/group.js"></script>
	<script src="js/groupEmployee/addEmp.js"></script>

	<!-- Page-Level Scripts -->
	<script>
		$(document).ready(function() {
			GroupEmployeeModule.init();
		});
	</script>
</body>
</html>